<app-header title="邀请收益"></app-header>

<ion-content>

  <div class="fixed_box">
    <div class="segment w96">
      <ion-segment (ionChange)="ontabsA(segmentAModel)" color="onbottom" [(ngModel)]="segmentAModel" mode="md">
        <ion-segment-button color="danger" value="s1">
          <ion-label>邀请收益</ion-label>
        </ion-segment-button>
        <ion-segment-button value="s2">
          <ion-label>好友列表</ion-label>
        </ion-segment-button>
        <ion-segment-button value="s3">
          <ion-label>邀请好友</ion-label>
        </ion-segment-button>
      </ion-segment>
    </div>

    <div class="segment_con" style="height: calc(100% - 5rem);overflow: hidden;">
      <ion-slides #slidesA (ionSlideDidChange)="slideChangeA()" style="height: 100%;overflow: hidden;">
        <ion-slide>
          <div class="segment_div">
            <div class="supercon df_ja">
              <div>
                <p>今日收益</p>
                <p *ngIf="gift">{{gift.todayEarnings}}</p>
              </div>
              <div>
                <p>昨日收益</p>
                <p *ngIf="gift">{{gift.yesterdayEarnings}}</p>
              </div>
            </div>
            <div class="sy_h4"><span>收益</span></div>
            
            <!-- 收益列表 -->
            <div class="sy_list">
              <ul *ngIf="invitelist.length > 0">
                <li *ngFor="let item of invitelist">
                  <p>+{{item.amount}}</p>
                  <span>{{item.createTime}}</span>
                </li>
              </ul>
              <div class="none" *ngIf="invitelist.length == 0">
                暂无数据
              </div>

          </div>
          </div>
        </ion-slide>

        <ion-slide>
          <div class="firendlist segment_div">
            <ul *ngIf="firendlist.length > 0">
              <li *ngFor="let item of firendlist" class="">
                <div class="fl-list">
                  <img [src]="item.avater" alt="">
                  <div> 
                    <p>{{item.nickname}}</p>
                    <p>{{item.phone.slice(0,3)}}****{{item.phone.slice(7,11)}}</p>
                  </div>
                </div>
                <div class="fr-list">
                  <span>{{item.name}}</span>
                  <p>个人存储：{{item.storage}}T</p>
                </div>
              </li>
            </ul>
            <div class="none" *ngIf="firendlist.length == 0">
              暂无数据
            </div>
          </div>
        </ion-slide>

        <ion-slide>
          <div class="invitefriends segment_div">
            <img *ngIf="ewm" [src]="ewm" alt="">
            <div>
              <p>我的邀请码</p>
              <p *ngIf="userInfo">{{userInfo.code}}</p>
              <p>
                <button class="buttons"  (click)="onSharing()">
                <a #atag>立即邀请</a> 
                </button>
              </p>
              <p *ngIf="iosapp">下载 : <a [href]="iosapp">{{iosapp}}</a> 
                <input type="text" #copy value="{{iosapp}}" disabled style="display: none;"></p>
              <!-- <p><a href="http://www.hengxunyun.com:808/app">立即下载（限安卓）</a></p> -->
              <p (click)="onCopy()"><span>复制</span></p>
            </div>
          </div>
        </ion-slide>

      </ion-slides>
    </div>
  </div>

</ion-content>
